# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=bigsh0t
pkgver=2.6
pkgrel=1
pkgdesc='A collection of frei0r plugins for VR video, with support for Shotcut'
arch=(loong64 x86_64)
url='https://bitbucket.org/leo_sutic/bigsh0t'
license=(GPL)
depends=(gcc-libs)
makedepends=(cmake python)
source=($pkgname-$pkgver::https://bitbucket.org/leo_sutic/bigsh0t/get/$pkgver.tar.gz)
sha256sums=('47804736114da5b92686d15a5c270255583a5f31e15c53ac0a26a6d2fb37d4d6')

prepare() {
  sed -e 's|-march=native||' -i leo_sutic-$pkgname-*/CMakeLists.txt # Don't use -march=native
}

build() {
  cmake -B build -S leo_sutic-$pkgname-* \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
#  DESTDIR="$pkgdir" cmake --install build
  install -Dm755 build/*.so -t "$pkgdir"/usr/lib/frei0r-1
  install -d "$pkgdir"/usr/share
  mv build/shotcut "$pkgdir"/usr/share
}
